Skip to content

Update dependency graphql-yoga to v6 - #242

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/graphql-yoga-6.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/graphql-yoga-6.x

Conversation

@renovate

@renovate renovate Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
graphql-yoga (source) ^5.21.2 → ^6.0.0 age confidence

Release Notes

graphql-hive/graphql-yoga (graphql-yoga)

v6.1.1

Compare Source

Patch Changes
  • #​4664
    ce73ba2
    Thanks @​seckardt! - allowedHeaders now removes every unlisted
    header when the request is a native Request. Previously, deleting a header while iterating a
    native Headers skipped the entry after each deleted one, so about every second unlisted header
    in a row stayed on the request seen by resolvers and on the response.

  • 3285ba5
    Thanks @​enisdenjo! - The default parser and validation caches are
    now also bounded by the total length of cached document strings (1 MiB), not only by entry count
    and TTL. A parsed document can take a few hundred times more memory than its text, so previously
    caching many large documents (including ones that fail validation) could exhaust the process
    memory. Documents and parse errors whose source is larger than this limit are no longer cached,
    and the least recently used entries are evicted to stay within it. Custom documentCache and
    errorCache implementations are not affected.

v6.1.0

Compare Source

Minor Changes
  • #​4647
    cfd0092
    Thanks @​egoodwinx! - Add support for the HTTP QUERY method as
    described in
    graphql/graphql-over-http#411.

    QUERY requests carry the GraphQL params in the request body, exactly like POST
    (application/json, application/graphql+json, application/graphql, and
    application/x-www-form-urlencoded are all supported), but are treated as safe/read-only like
    GET: sending a mutation over QUERY is rejected with a 405 Method Not Allowed response, the
    same way it already is for GET.

Patch Changes
  • #​4650
    045fc2f
    Thanks @​Shaurya55555! - Match the request Content-Type media
    type case-insensitively and allow optional whitespace before its parameters, as required by
    RFC 9110. A request sent with Application/JSON or application/json ; charset=utf-8 was
    rejected with 415 Unsupported Media Type.

  • #​4658
    38e9f1b
    Thanks @​egoodwinx! - dependencies updates:

  • #​4646
    35501fe
    Thanks @​mattkrick! - A schema factory function now works when
    getEnveloped is called outside of the request pipeline, for example by graphql-ws. When the
    context passed to getEnveloped has a Fetch API Request as request, the factory is called
    with that context instead of throwing "No schema found for this request", and it has to return the
    schema synchronously there. The WebSocket recipes now pass the upgrade request as request.

  • #​4656
    807c7af
    Thanks @​mattkrick! - Mutations sent over a WebSocket no longer
    fail with "Can only perform a mutation operation from a POST request." when the WebSocket server
    passes the upgrade request to getEnveloped or getResultForParams. The check now applies only
    to requests that Yoga's HTTP handler parsed.

  • Updated dependencies
    [38e9f1b,
    38e9f1b]:

v6.0.1

Compare Source

Patch Changes
  • #​4634
    d73f61c
    Thanks @​ardatan! - dependencies: bump @whatwg-node/server to
    ^0.13.1 so native Request subclasses (Next.js NextRequest, including the App Router
    proxyNextRequest Proxy) are classified as the platform Fetch API. The body-size limiter no
    longer throws a cross-realm TypeError / 500 on those requests; oversized bodies still
    return 413.

    See #​4633 and
    ardatan/whatwg-node#3717.

v6.0.0

Compare Source

Major Changes
  • #​4575
    862447a
    Thanks @​egoodwinx! - Use
    @graphql-hive/logger and add correlated, per-request
    logging (closes #​4048)

    Every request now gets its own logger, available as context.log (and serverContext.log in
    plugin hooks), tagged with a requestId. Everything logged while handling a request can be
    correlated by that id.

    The request id is taken from the host integration if it already assigned one (e.g. Fastify's
    request.id), otherwise from the incoming x-request-id header, otherwise generated. It is also
    sent back in the x-request-id response header. Configure it with the new requestId option:

    createYoga({
      requestId: {
        // don't trust the incoming header, recommended when clients can reach the server directly
        trustHeader: false,
        headerName: 'x-correlation-id',
        generateRequestId: () => myId()
      }
    })

    Pass requestId: false to disable it.

    At the info level, a single "Request processed" line is logged per request with the method,
    path, operation name and type, response status, error count and duration. At the debug level,
    more details about request processing are logged.

    Masked errors are now logged with the request's logger, so they can be traced back to the request
    that caused them. Custom maskError functions receive the request's context as an optional fourth
    argument.

    The @envelop/newrelic, @envelop/auth0, @envelop/resource-limitations, @envelop/statsd,
    @envelop/graphql-jit, @envelop/response-cache and @envelop/response-cache-cloudflare-kv
    plugins accept a new log option for their own messages, instead of always writing to the
    console.

    @envelop/response-cache's shouldCacheResult now also receives the GraphQL context.

Breaking Changes
  • The @graphql-yoga/logger package has been removed. graphql-yoga re-exports Logger,
    MemoryLogWriter and LogLevel from @graphql-hive/logger instead.
  • createLogger and the YogaLogger type are no longer exported. Use new Logger(options)
    instead.
  • The logging option now takes boolean | Logger | LogLevel, where Logger is the one from
    @graphql-hive/logger.
  • yoga.logger has been renamed to yoga.log.
  • The logger option of useGraphiQL and useHealthCheck has been removed. They now log through
    the request's logger.
  • @graphql-yoga/nestjs now logs through Nest's Logger by default instead of not logging at
    all. Pass logging: false to keep the previous behaviour. logging: true on Fastify no longer
    logs through Fastify's logger, pass it explicitly instead (see below).
  • @envelop/apollo-federation, @envelop/auth0, @envelop/graphql-jit, @envelop/newrelic,
    @envelop/resource-limitations, @envelop/response-cache,
    @envelop/response-cache-cloudflare-kv and @envelop/statsd now have a peer dependency on
    @graphql-hive/logger that you must install.
  • @envelop/apollo-federation's logger option now expects a Logger from
    @graphql-hive/logger and defaults to new Logger() instead of console.
Migration

Create loggers with Logger:

- import { createLogger } from 'graphql-yoga';
+ import { Logger } from 'graphql-yoga';

  createYoga({
-   logging: createLogger('debug'),
+   logging: new Logger({ level: 'debug' }),
  });

Use log instead of logger on the Yoga instance:

  const plugin = {
    onYogaInit({ yoga }) {
-     yoga.logger.info('ready');
+     yoga.log.info('ready');
    },
  };

Prefer the request-scoped logger inside resolvers and plugin hooks so the logs carry the request
id:

const resolvers = {
  Query: {
    hello: (_, __, context) => {
      context.log.debug('resolving hello')
      return 'world'
    }
  }
}

If you use any of the @envelop/* plugins listed above, install the logger:

npm i @graphql-hive/logger

If you depended on @graphql-yoga/logger directly, switch to @graphql-hive/logger:

- import { Logger } from '@graphql-yoga/logger';
+ import { Logger } from '@graphql-hive/logger';

To keep logging through Fastify's logger in @graphql-yoga/nestjs:

import { Logger } from 'graphql-yoga'
import { PinoLogWriter } from '@graphql-hive/logger/writers/pino'

// in your yoga driver options
logging: new Logger({ writers: [new PinoLogWriter(app.log)] })
  • #​4574
    79b0e8b
    Thanks @​egoodwinx! - ### Breaking Changes
    • Node: minimum supported version is now Node 22. Node 18 and 20 are no longer supported.
      Future releases will only support Node >=22.
    • GraphQL: minimum supported version is now GraphQL 16. GraphQL 14 and 15 are no longer
      supported.
    • Request body parsing: Yoga now limits request bodies to 25,000,000 bytes by default.
      Enforcing this limit streams the body through a byte counter, making POST body parsing
      asynchronous even for an in-memory body. As a result, yoga.fetch() can return a Promise where
      it previously returned a synchronous Response, even when all resolvers and plugins are
      synchronous.
Migration
  • If you're on Node 18/20, upgrade to Node 22 or later before upgrading this package.

  • If you're on graphql 14/15, upgrade to graphql 16 or 17 first.

  • Await yoga.fetch() and response body parsing instead of relying on synchronous results. Set
    maxRequestBodySize: false in createYoga to disable the body-size limit and preserve
    synchronous parsing for in-memory bodies, but only if you enforce an appropriate request-body
    limit elsewhere.

  • #​4623
    be89d05
    Thanks @​ardatan! - ### Dependencies

    • Bump @graphql-tools/utils to ^13.1.1, @graphql-tools/schema to ^11.0.0, and
      @graphql-tools/executor to ^4.1.2.
Incremental delivery

Yoga maps the GraphQL HTTP Accept header through INCREMENTAL_DELIVERY_SPECS from
@graphql-tools/utils onto executor incrementalSpec. multipart/mixed;incrementalSpec=v0.2
runs the v0.2 payload format and echoes that spec on Content-Type.
multipart/mixed;deferSpec=20220824 or bare multipart/mixed stays on v0.1. An unsupported
incremental spec yields 406.

A later incremental spec is a graphql-tools table row plus an executor publisher. Yoga, Hive
Gateway, and HTTP executors pick it up by bumping @graphql-tools/utils /
@graphql-tools/executor.

Breaking Changes
  • createGraphQLError is removed. Use new GraphQLError(message, options) from graphql. To
    attach Yoga's experimental schema coordinate, use withSchemaCoordinate(error, coordinate) and
    read with getSchemaCoordinate from @graphql-tools/utils.
  • mapMaybePromise is removed (was exported from Yoga / @envelop/core). Use
    handleMaybePromise from @whatwg-node/promise-helpers.
  • Yoga no longer re-exports helpers that already live upstream:
    • getSchemaCoordinate -> @graphql-tools/utils
    • mergeSchemas -> @graphql-tools/schema
    • DisposableSymbols -> @whatwg-node/server
    • mapAsyncIterator / isPromise / fakePromise / handleMaybePromise / MaybePromise ->
      @whatwg-node/promise-helpers
  • @envelop/core utils no longer re-exports mapAsyncIterator or isPromise. Import from
    @whatwg-node/promise-helpers.
  • Use asGetArgumentValuesVariables / coerceGetVariableValuesResult from @graphql-tools/utils
    for GraphQL 16/17 VariableValues compatibility.
Migration
import { GraphQLError } from 'graphql'
import { withSchemaCoordinate } from 'graphql-yoga'
import { mergeSchemas } from '@graphql-tools/schema'
import { getSchemaCoordinate } from '@graphql-tools/utils'
import { handleMaybePromise, isPromise, type MaybePromise } from '@whatwg-node/promise-helpers'
import { DisposableSymbols } from '@whatwg-node/server'

throw withSchemaCoordinate(new GraphQLError('not found'), 'Query.user')
  • #​4574
    79b0e8b
    Thanks @​egoodwinx! - ### Dependencies
    • Bump @whatwg-node/server to ^0.13.0, @whatwg-node/fetch to ^0.12.0, and
      @whatwg-node/promise-helpers to ^2.0.0.
    • Delegate to @​whatwg-node/server's useLimitRequestBodySize instead of a hand-rolled byte counter,
      and swap in the native TransformStream when the incoming request already has a native
      ReadableStream body — piping it through the ponyfill TransformStream throws since they're
      different realms. Thread an optional fetchAPI param through handle/parseRequest/
      getResultForParams so callers can override which fetchAPI (native vs ponyfill) the rest of the
      pipeline uses.
    • Unread request bodies are discarded after the response is decided (keep-alive friendly).
    • Incoming global Request instances automatically use the native Fetch API
      (pickRightFetchAPI), so Next.js no longer needs fetchAPI: { Response }.
Breaking Changes
  • engines.node is now >=22.15.0 (aligned with whatwg-node 0.12+/0.13).
  • @envelop/core no longer exports mapMaybePromise (removed upstream in
    @whatwg-node/promise-helpers v2). Use handleMaybePromise(() => value, ...) instead.
  • @whatwg-node/fetch no longer exports crypto; use the platform crypto global. TextEncoder
    still comes from fetchAPI where hashing goes through Yoga’s FetchAPI.
Patch Changes

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: StarwarsExample/server/package-lock.json
npm warn Unknown env config "store". This will error in a future major version of npm. See `npm help npmrc` for supported config options.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @graphql-yoga/plugin-apq@3.24.6
npm error Found: graphql-yoga@6.1.1
npm error node_modules/graphql-yoga
npm error   graphql-yoga@"^6.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer graphql-yoga@"^5.24.6" from @graphql-yoga/plugin-apq@3.24.6
npm error node_modules/@graphql-yoga/plugin-apq
npm error   @graphql-yoga/plugin-apq@"^3.21.2" from the root project
npm error
npm error Conflicting peer dependency: graphql-yoga@5.24.6
npm error node_modules/graphql-yoga
npm error   peer graphql-yoga@"^5.24.6" from @graphql-yoga/plugin-apq@3.24.6
npm error   node_modules/@graphql-yoga/plugin-apq
npm error     @graphql-yoga/plugin-apq@"^3.21.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2026-11-24T01_01_50_545Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-11-24T01_01_50_545Z-debug-0.log

@renovate
renovate Bot force-pushed the renovate/graphql-yoga-6.x branch 9 times, most recently from 9efaa55 to 28516da Compare October 30, 2026 00:30
@renovate
renovate Bot force-pushed the renovate/graphql-yoga-6.x branch 8 times, most recently from 6768d0b to 1c3640e Compare November 6, 2026 19:29
@renovate
renovate Bot force-pushed the renovate/graphql-yoga-6.x branch 7 times, most recently from 8b4af37 to 939c398 Compare November 15, 2026 06:34
@renovate
renovate Bot force-pushed the renovate/graphql-yoga-6.x branch 3 times, most recently from 512706a to 3091746 Compare November 19, 2026 10:42
@renovate
renovate Bot force-pushed the renovate/graphql-yoga-6.x branch from 3091746 to 56c552f Compare November 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants